package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpContractsQuoterExportToMasPageUtil extends
		SeleniumPageUtil {
	public final static By CQE_TD_TITLE= By.xpath("//*[@id='Quoter_QuoteList1_pnlPage']/table/tbody/tr/td[4]");
	public final static By CQE_LIST_SCOPE= By.id("Quoter_QuoteList1_lblScope");
	public final static By CQE_TD_CONTRACTID = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[1]");
	public final static By CQE_TD_REVISION = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[2]");
	public final static By CQE_TD_SUBVER = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[3]");
	public final static By CQE_TD_TYPE = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[4]");
	public final static By CQE_TD_TEMP = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[5]");
	public final static By CQE_TD_CHANGES = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[6]");
	public final static By CQE_TD_REV_STATUS = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[7]");
	public final static By CQE_TD_CUSTOMER = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[8]");
	public final static By CQE_TD_TYPE_TWO = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[9]");
	public final static By CQE_TD_CPN = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[10]");
	public final static By CQE_TD_START = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[11]");
	public final static By CQE_TD_END = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[12]");
	public final static By CQE_TD_SALE_REP = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[13]");
	public final static By CQE_TD_LINES = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[14]");
	public final static By CQE_TD_CREATE_BY = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[15]");
	public final static By CQE_TD_CREATE_DATE = By.xpath("//*[@id='Quoter_QuoteList1_tblCompare']/tbody/tr[2]/td[16]");
	public static void enter(){
		SpContractsQuoterPageUtil.enter();
		SpContractsQuoterPageUtil.displayHidenMenus(new By[]{SpContractsQuoterPageUtil.STQ_LINK_QUOTER});
		SeleniumUtil.waitOnElements(new By[]{SpContractsQuoterPageUtil.STQ_LINK_QUOTER_WAIT_EXPORT});
		SeleniumUtil.click(SeleniumUtil.getCachedElement(SpContractsQuoterPageUtil.STQ_LINK_QUOTER_WAIT_EXPORT));
		SeleniumUtil.waitForFixedMilliseconds(1000);
		waitForPageToLoad();
	}

	private static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.waitOnElements(new By[]{
		});
	}
}
